﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMTPLibrary;
using TPTecnicas.MessageProcessor.Common;


namespace TPTecnicas.MessageConnection
{
    public class SMTPLibraryWrapper : IMessageConnection
    {
        private SMTPLibrary.SMTPLibrary smtp;


        public void Connect(string server, string username, string password)
        {
            smtp = new SMTPLibrary.SMTPLibrary(username, password);
        }


		public bool Send(string to, string subject, string body)
		{
			return smtp.Send(to, subject, body);
		}

        public void Disconnect()
        {
			smtp.Dispose();
        }
    }
}


